package com.namo.cchtool.dao;

import com.namo.cchtool.entity.Contact;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author  WangXin
 * @date  2021/5/17 11:05
 */

@Mapper
public interface ContactMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Contact record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(Contact record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    Contact selectByPrimaryKey(String id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Contact record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Contact record);

    /**
     * 选择所有数据
     * @return
     */
    List<Contact> selectAll();
}